// 函数式子组件
import React  from "react"
const Funchild = ({ receiveMessage,postMessage})=>{
  const handleClick = ()=>{
    postMessage('来自子组件')
  }

  return (
    <div>
      <h2>函数式子组件</h2>
      <p>{receiveMessage}</p>
      <button onClick={handleClick}>发送信息到父组件</button>
    </div>
  )
}

export default Funchild